package com.baibei.ebec.user.status;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import android.view.View;
import android.widget.TextView;

import com.baibei.ebec.user.R;
import com.baibei.ebec.user.R2;
import com.baibei.module.BasicFragment;

import butterknife.BindView;

/**
 * 功能受限界面
 * Created by ChenRui on 2017/8/16 0016 19:29.
 */
public class NotAllowFragment extends BasicFragment {

    public static NotAllowFragment newInstance(String title) {
        Bundle args = new Bundle();
        args.putString("title", title);
        NotAllowFragment fragment = new NotAllowFragment();
        fragment.setArguments(args);
        return fragment;
    }

    @BindView(R2.id.tv_title)
    TextView mTitleView;
    private String mTitle;

    @Override
    public int getLayoutId(Bundle bundle) {
        return R.layout.fm_not_allow;
    }

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mTitle = getArguments().getString("title");
    }

    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        if (!TextUtils.isEmpty(mTitle)) {
            mTitleView.setText(mTitle);
        }
    }
}
